Skip to content

fix: Accept&ignore group_type for some views#7052

Merged
rjsparks merged 2 commits intoietf-tools:mainfrom
jennifer-richards:ignore-group-type
Feb 12, 2024
Merged

fix: Accept&ignore group_type for some views#7052
rjsparks merged 2 commits intoietf-tools:mainfrom
jennifer-richards:ignore-group-type

Conversation

@jennifer-richards
Copy link
Copy Markdown
Member

Fixes #7050

This adds a decorator that wraps a Django view and causes the view to ignore one or more kwargs if they are present when the view is called with a request. This is applied to views in the ietf.group.urls.info_detail_urls that do not already accept group_type so that they won't fail when accessed by way of ietf.group.urls.grouptype_urls.

A couple of views that accepted and ignored group_type have been refactored to use the decorator as a hint that they're not intended to use the parameter.

One view, ietf.group.milestones.reset_charter_milestones, has had its signature changed to allow it to work without the group_type parameter. It already guards against the case that its group does not use charter milestones, so this tweak should allow it to work from a /group/xyz url rather than only a /wg/xyz url when it makes sense.

@rjsparks rjsparks merged commit 9d2a113 into ietf-tools:main Feb 12, 2024
@jennifer-richards jennifer-richards deleted the ignore-group-type branch February 13, 2024 00:26
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not all info_detail_urls views support group_type kwarg

2 participants